//
//  FRNearLiveCell.m
//  Live
//
//  Created by 徐芙蓉 on 2017/8/23.
//  Copyright © 2017年 Afra. All rights reserved.
//

#import "FRNearLiveCell.h"

@interface FRNearLiveCell ()

@property (weak, nonatomic) IBOutlet UIImageView *headView;
@property (weak, nonatomic) IBOutlet UILabel *distanceLabel;


@end

@implementation FRNearLiveCell

-(void)setLive:(FRLive *)live
{
    _live = live;
    [self.headView downloadImage:live.creator.portrait placeholder:@"default_room"];
    self.distanceLabel.text = live.distance;
}

-(void)showAnimation
{
    if (self.live.isShow) {
        return;
    }
    self.layer.transform = CATransform3DMakeScale(0.1, 0.1, 1);
    [UIView animateWithDuration:0.5 animations:^{
        
        self.layer.transform = CATransform3DMakeScale(1, 1, 1);
        
        self.live.show = YES;
        
    }];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

@end
